﻿
@{
    Layout = null;
}

<link href="~/BootstrapS/css/bootstrap.min14ed.css" rel="stylesheet" />
<link href="~/BootstrapS/css/font-awesome.min93e3.css" rel="stylesheet" />
<link href="~/BootstrapS/css/animate.min.css" rel="stylesheet" />
<link href="~/BootstrapS/css/style.min862f.css" rel="stylesheet" />
<script src="~/vue/axios.min.js"></script>
<script src="~/vue/qs.min.js"></script>
<script src="~/vue/vue.min.js"></script>
<body>
    <div id="tab">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" v-on:click="location.reload()"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            <h4 class="modal-title">编辑病房</h4>
        </div>
        <div class="modal-body">
            <div style="margin-left:40px;margin-top:-10px;margin-bottom:400px" id="tab">
                <div class="col-md-6" style="width:500px">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">病房编号：</label>
                        <div class="col-sm-9">
                            <input type="text" v-model="sive.roomIntensive_Number" id="text1" name="" class="form-control" placeholder="请输病房编号">
                        </div>
                    </div>
                    <div class="form-group" style="margin-top:50px">
                        <label class="col-sm-3 control-label">病人姓名：</label>
                        <div class="col-sm-9">
                            <input type="text" v-model="sive.patient_Name" id="text2" name="" class="form-control" placeholder="请输病人姓名">

                        </div>
                    </div>
                    <div class="form-group" style="margin-top:110px">
                        <label class="col-sm-3 control-label">出院日期：</label>
                        <div class="col-sm-9">
                            <input type="text" v-model="sive.roomIntensive_TimeEnd" id="text3" name="" class="form-control" placeholder="请输入出院日期">

                        </div>
                    </div>
                </div>
                <div class="col-md-6" style="width:500px;margin-top:20px">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">病房类型：</label>
                        <div class="col-sm-9">
                            <select class="form-control" id="select1" v-model="sive.roomType_Id">
                                <option v-bind:value="0">请选择病房类型</option>
                                <option v-for="item in info" v-bind:value="item.roomType_Id">{{item.roomType_Name}}</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group" style="margin-top:50px">
                        <label class="col-sm-3 control-label">分配日期：</label>
                        <div class="col-sm-9">
                            <input type="text" v-model="sive.roomIntensive_TimeBegin" id="text4" name="" class="form-control" placeholder="请输入分配日期">

                        </div>
                    </div>
                    <div class="form-group" style="margin-top:110px">
                        <label class="col-sm-3 control-label">医生姓名：</label>
                        <div class="col-sm-9">
                            <input type="text" v-model="sive.doctor_Name" id="text5" name="" class="form-control" placeholder="请输入医生姓名">

                        </div>
                    </div>
                </div>
                <div class="col-md-6" style="width:1000px">
                    <div class="form-group" style="margin-top:20px">
                        <label class="col-sm-3 control-label">备注信息：</label>
                        <div class="col-sm-9" style="margin-left:118px;margin-top:-20px">
                            <textarea id="TextArea1" v-model="sive.roomIntensive_State" rows="2" cols="20" class="form-control" placeholder="请输入备注信息" style="width:320px"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-white" v-on:click="location.reload()" data-dismiss="modal">关闭</button>
            <button type="button"  class="btn btn-primary" v-on:click="location.reload()">保存</button>
        </div>
    </div>
</body>
<script src="~/BootstrapS/js/jquery.min.js"></script>
<script src="~/BootstrapS/js/bootstrap.min.js"></script>
<script src="~/BootstrapS/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="~/BootstrapS/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="~/BootstrapS/js/plugins/layer/layer.min.js"></script>
<script src="~/BootstrapS/js/hplus.min.js"></script>
<script src="~/BootstrapS/js/contabs.min.js"></script>
<script src="~/BootstrapS/js/plugins/pace/pace.min.js"></script>
<script>
    var pid = sessionStorage["pid"];

    new Vue({
        el: '#tab',
        data() {
            return {
                info: null,
                sive: null
            }

        },
        mounted() {
            function getout() {
                return axios
                    .get('/Rooms/GetRoomTypes');
            }
            function getpat() {
                return axios.get('/Rooms/GetRoomById', { params: { pid: pid } });
            }
            axios.all([getout(), getpat()])
                .then(axios.spread((getouts, getpats) => {
                    this.info = getouts.data;
                    this.sive = getpats.data;
                }))
        }
    });


</script>